]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
swipeTracker: Set up 1fg drag gesture in capture phase
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 28 Jun 2022 21:45:15 +0000 (23:45 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 10 Aug 2022 17:11:26 +0000 (17:11 +0000)
This should be handled in the capture phase so containers setting
up the drag gesture have an opportunity to handle events from children.
This also follows what the 3fg swipe gesture does.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2278>

js/ui/swipeTracker.js

index 0781fec81e88574c45abd71d5f5299315330b292..869f977c554111aaa524e64918d23aad8943c3fa 100644 (file)
@@ -503,7 +503,7 @@ var SwipeTracker = GObject.registerClass({
             this.bind_property('orientation', this._dragGesture, 'orientation',
                 GObject.BindingFlags.SYNC_CREATE);
             this.bind_property('distance', this._dragGesture, 'distance', 0);
-            actor.add_action(this._dragGesture);
+            actor.add_action_full('drag', Clutter.EventPhase.CAPTURE, this._dragGesture);
         } else {
             this._dragGesture = null;
         }